package net.oktaeder.office.utils.generators;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * Class to generate names for employees
 * 
 * @author tuukka
 *
 */
public class NameGenerator {

	private static Log log = LogFactory.getLog(NameGenerator.class);
	
	/**
	 * Generated random name for a person
	 * 
	 * @return new generated name
	 */
	public String generateSimpleName() {
		
		String firstName;
		String lastName;
		
		try {
			//TODO: this is just a default name, write real generator later
			firstName = "default";
			lastName = "name";
			
			return firstName + " " + lastName;	
		} catch (Exception ex) {
			log.error("Name generation failed, defaulting to static one", ex);
			return "Default Name";
		}
	}
	
	/**
	 * Generate full name + nick name combination
	 * 
	 * @return three part name, where middle one is nick-name
	 */
	public String generateNickName() {

		String firstName;
		String lastName;
		String nickName;
		
		try {
			//TODO: this is just a default name, write real generator later
			firstName = "default";
			lastName = "name";
			nickName = "nick";
			
			return firstName + " " + nickName + " " + lastName;	
		} catch (Exception ex) {
			log.error("Name generation failed, defaulting to static one", ex);
			return "Default Nick Name";
		}		
		
	}
	
}
